﻿hpxAdminApp.controller('withdrawController', function ($scope, $rootScope, $state, Upload, FILE_URL, PHOTO_FILE_URL, fileService, API_URL, XINGYE_URL, NgTableParams, payService, orderService, constantsService) {
    $scope.model = {}
    $scope.xingyeWithdraw = function () {
        if (!$scope.model.amt) {
            alert("请输入提现金额")
            return;
        }
        var confirmText = '确认要提现' + $scope.model.amt + '元吗？'
        if (confirm(confirmText)) {
            // 发送提现请求
            payService.profit($scope.model).then(function (data) {
                //console.log(data)
                alert('提现成功！');
                $scope.model = {}
                //window.location.reload()
            })
        }
    }
    $scope.goXingYe = function () {
        console.log(XINGYE_URL)
        // 登陆执剑人平台
        setTimeout(function () {
            window.open(XINGYE_URL)
        },500)
    }
});